#!/bin/sh
# Update the function prototypes in proto.h by using the cproto utility.
# Run this whenever a new C function is added to the Mathomatic source code or
# whenever a function definition is changed.

cproto </dev/null >/dev/null || exit 1 # Test for existence of cproto utility.
echo '/* Complete list of global C function prototypes for Mathomatic. */' >cproto.h
echo '/* This file was created with the cproto utility by running the "./update" script. */' >>cproto.h
echo '/* This file is required to compile Mathomatic quietly with the -Wall compiler option. */' >>cproto.h
echo >>cproto.h
cproto -DUNIX -DDEBUG *.c >>cproto.h && mv cproto.h proto.h && echo proto.h recreated.
